export const ConfirmTempMixin = {
  methods: {
    ConfirmTemp (text, cb, type = 'warning') {
      this.$confirm(text, '捎货提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: type
      })
      .then(() => {
        cb()
      })
      .catch(console.log)
    },
    async PromptTemp (text, validator, errText) {
      return this.$prompt(text, '捎货提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputValidator: validator,
        inputErrorMessage: errText
      })
    }
  }
}
